package com.liang.design;

/**
 * @author lsm
 * @ClassName Singleton_05.java
 * @Description 双重锁校验(线程安全)
 * @createTime 2023年12月01日 10:37:00
 */
public class Singleton_05 {

    private static Singleton_05 instance;

    private Singleton_05(){}

    public static Singleton_05 getInstance(){
        if (null == instance){
            synchronized (Singleton_05.class){
                if (null == instance){
                    instance = new Singleton_05();
                }
            }
        }
        return instance;
    }
}
